package com.leetroll.common.vo;

import com.leetroll.common.entity.File;
import lombok.Data;

@Data
public class FileVO extends BaseVO{
    //fileId
    private Long id;
    //所属itemId
    private Long rescId;
    //类型
    private String type;
    //名称
    private String name;
    //大小
    private String size;
    //格式
    private String format;
    //文件link
    private String link;

    public static FileVO fromFile(File file) {
        FileVO fileVO = new FileVO();
        fileVO.name = file.getName();
        fileVO.format = file.getFormat();
        return fileVO;
    }
}
